#ifndef __NET_H__
#define __NET_H__

#include <netinet/in.h>

const char *net_version();
int net_tcp_client_init(const char *ip, unsigned short port, struct timeval *timeout);
int net_tcp_server_init(unsigned short port, unsigned int listen_num);
int net_udp_client_init();
int net_udp_server_init(unsigned short port);
int set_socket_recv_timeout(int sockfd, float sec);
int set_socket_send_timeout(int sockfd, float sec);
int net_tcp_client_init_v6(const char *ip, unsigned short port, struct timeval *timeout);
int net_tcp_server_init_v6(unsigned short port, unsigned int listen_num);

#endif
